package pack0623;

public class Birds1 {
    int legs=2;
    String type= "游禽";
    String name="野鸭";
    Birds1(int l,String t,String n){
        legs=l;
        type=t;
        name=n;
    }
    public void fly(){
        System.out.println(name+"  能飞翔");
    }
    public static void main(String[] args) {
        Birds1 b=new Birds1(4,"鸣禽","黄鹂");
        b.fly();
        System.out.println("鸟的腿:"+b.legs+"  鸟的种类:"+b.type+"  鸟的名字:"+b.name);
        Birds1 b1=new Birds1(0,"涉禽","鱼");
        System.out.println("鸟的腿:"+b1.legs+"  鸟的种类:"+b1.type+"  鸟的名字:"+b1.name);
    }
}
